package org.example.config;


import org.example.trigger.interceptor.DCCInterceptor;
import org.example.trigger.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;

/**
 * @author yinghuashen
 * @version 1.0
 * @description:
 * @date 2025/3/4 23:25
 */

@Configuration
public class WebConfig implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer{

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor())
                .addPathPatterns("/**")
                .excludePathPatterns("/user/**")
                .excludePathPatterns("/dcc/**")
                .excludePathPatterns("/test/**");

        registry.addInterceptor(new DCCInterceptor())
               .addPathPatterns("/dcc/**");
    }
}
